package net.viservice.quartz.service;

import java.util.Map;

import net.viservice.job.quartz.Task;

public interface QuartzService {

	/**
	 * 添加任务
	 * 
	 * @param jobGroup
	 * @param jobName
	 * @param task
	 * @param dataMap
	 * @param cronExpression
	 * @return
	 */
	public boolean scheduleJob(String jobGroup, String jobName, Task task, Map<String, Object> dataMap, String cronExpression);

	/**
	 * 暂停任务
	 * 
	 * @param jobGroup
	 * @param jobName
	 * @return
	 */
	public boolean pauseJob(String jobGroup, String jobName);

	/**
	 * 恢复任务
	 * 
	 * @param jobGroup
	 * @param jobName
	 * @return
	 */
	public boolean resumeJob(String jobGroup, String jobName);

	/**
	 * 删除任务
	 * 
	 * @param jobGroup
	 * @param jobName
	 * @return
	 */
	public boolean deleteJob(String jobGroup, String jobName);

	/**
	 * 检查任务是否存在
	 * 
	 * @param jobGroup
	 * @param jobName
	 * @return
	 */
	public boolean checkExists(String jobGroup, String jobName);

}
